/*******************************************************************************
 * Copyright (c) 2007 University of Oslo.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     University of Oslo - initial API and implementation
 *******************************************************************************/

package com.cea.papyrus.diagram.sequence.sedi.figures;

import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.gef.requests.CreateConnectionRequest;
import org.eclipse.gef.requests.ReconnectRequest;

/**
 * AnchorPolicies can be installed on an anchor to help it decide
 * whether to accept a connecting object.
 *   
 * @author frankd@ifi.uio.no
 */
public interface AnchorPolicy {
	boolean acceptConnectionCreate(ConnectionAnchor anchor, CreateConnectionRequest request);
	boolean acceptConnectionComplete(ConnectionAnchor anchor, CreateConnectionRequest request);
	boolean acceptReconnectSource(ConnectionAnchor anchor, ReconnectRequest request);
	boolean acceptReconnectTarget(ConnectionAnchor anchor, ReconnectRequest request);
	
}
